define(function(){
    'use strict';
    return function (localData){
        return localData.reduce((start,val)=>{
            return val.flag ? start + Number(val.num) : start;
        }, 0)
    }
    
})